<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Hardware Abstraction Layer (HAL)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="logo.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Hardware Abstraction Layer (HAL)</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__group__hal__pwm.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">API Reference</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">PWM (Pulse Width Modulator)<div class="ingroups"><a class="el" href="group__group__hal.html">HAL Drivers</a></div></div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<p >High level interface for interacting with the pulse width modulator (PWM) hardware resource. </p>
<p >The PWM driver can be used to generate periodic digital waveforms with configurable frequency and duty cycle. The driver allows assigning the PWM output and an optional inverted output to supplied pins. The driver supports interrupt generation on PWM terminal count and compare events.</p>
<h1><a class="anchor" id="section_pwm_features"></a>
Features</h1>
<ul>
<li>Configurable pin assignment for the PWM output</li>
<li>Optional complementary (inverted) PWM output to a second pin</li>
<li>Configurable dead time between normal and inverted PWM outputs</li>
<li>Configurable alignment: left, right or center</li>
<li>Continuous or One-shot operation</li>
<li>Option to instantiate and use a new clock or use pre-allocated clock for clock input</li>
<li>Configurable interrupt and callback assignment on PWM events: terminal count, compare match or combination of both</li>
</ul>
<h1><a class="anchor" id="section_pwm_quickstart"></a>
Quick Start</h1>
<p >See <a class="el" href="group__group__hal__pwm.html#subsection_pwm_snippet_1">Snippet 1: Simple PWM initialization and output to pin</a> for a code snippet that generates a signal with the specified frequency and duty cycle on the specified pin.</p>
<h1><a class="anchor" id="section_pwm_snippets"></a>
Code snippets</h1>
<h2><a class="anchor" id="subsection_pwm_snippet_1"></a>
Snippet 1: Simple PWM initialization and output to pin</h2>
<p >The following snippet initializes a PWM resource and assigns the output to the supplied <b>pin</b> using <a class="el" href="group__group__hal__pwm.html#ga54a93c541bdbb3fce066a2af00d8b67f">cyhal_pwm_init</a>. <br  />
 The clock parameter <b>clk</b> is optional and need not be provided (NULL), to generate and use an available clock resource with a default frequency. <br  />
 The clock frequency and the duty cycle is set using <a class="el" href="group__group__hal__pwm.html#ga69dd46478849e170fd91c8171be8ae95">cyhal_pwm_set_duty_cycle</a>. <br  />
 <a class="el" href="group__group__hal__pwm.html#ga95006bcc5841e610719433660365e3e2">cyhal_pwm_start</a> starts the PWM output on the pin.</p>
<div class="fragment"><div class="line">    <a class="code hl_typedef" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a>   rslt;</div>
<div class="line">    <a class="code hl_struct" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> pwm_obj;</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Initialize PWM on the supplied pin and assign a new clock</span></div>
<div class="line">    rslt = <a class="code hl_define" href="group__group__hal__pwm.html#ga54a93c541bdbb3fce066a2af00d8b67f">cyhal_pwm_init</a>(&amp;pwm_obj, <a class="code hl_enumvalue" href="group__group__hal__impl__pin__package__psoc6__01__104__m__csp__ble.html#gga707195ce0627016bf371643bdd9caa51a23d505c049c81443b12e53d5b00b1be9">P0_0</a>, NULL);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Set a duty cycle of 50% and frequency of 1Hz</span></div>
<div class="line">    rslt = <a class="code hl_function" href="group__group__hal__pwm.html#ga69dd46478849e170fd91c8171be8ae95">cyhal_pwm_set_duty_cycle</a>(&amp;pwm_obj, 50, 1);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Start the PWM output</span></div>
<div class="line">    rslt = <a class="code hl_function" href="group__group__hal__pwm.html#ga95006bcc5841e610719433660365e3e2">cyhal_pwm_start</a>(&amp;pwm_obj);</div>
<div class="ttc" id="agroup__group__hal__impl__hw__types_html_structcyhal__pwm__t"><div class="ttname"><a href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a></div><div class="ttdoc">PWM object.</div><div class="ttdef"><b>Definition:</b> cyhal_hw_types.h:995</div></div>
<div class="ttc" id="agroup__group__hal__impl__pin__package__psoc6__01__104__m__csp__ble_html_gga707195ce0627016bf371643bdd9caa51a23d505c049c81443b12e53d5b00b1be9"><div class="ttname"><a href="group__group__hal__impl__pin__package__psoc6__01__104__m__csp__ble.html#gga707195ce0627016bf371643bdd9caa51a23d505c049c81443b12e53d5b00b1be9">P0_0</a></div><div class="ttdeci">@ P0_0</div><div class="ttdoc">Port 0 Pin 0.</div><div class="ttdef"><b>Definition:</b> cyhal_psoc6_01_104_m_csp_ble.h:55</div></div>
<div class="ttc" id="agroup__group__hal__pwm_html_ga54a93c541bdbb3fce066a2af00d8b67f"><div class="ttname"><a href="group__group__hal__pwm.html#ga54a93c541bdbb3fce066a2af00d8b67f">cyhal_pwm_init</a></div><div class="ttdeci">#define cyhal_pwm_init(obj, pin, clk)</div><div class="ttdoc">Initialize the PWM out peripheral and configure the pin This is similar to the cyhal_pwm_init_adv() b...</div><div class="ttdef"><b>Definition:</b> cyhal_pwm.h:127</div></div>
<div class="ttc" id="agroup__group__hal__pwm_html_ga69dd46478849e170fd91c8171be8ae95"><div class="ttname"><a href="group__group__hal__pwm.html#ga69dd46478849e170fd91c8171be8ae95">cyhal_pwm_set_duty_cycle</a></div><div class="ttdeci">cy_rslt_t cyhal_pwm_set_duty_cycle(cyhal_pwm_t *obj, cy_float32_t duty_cycle, uint32_t frequencyhal_hz)</div><div class="ttdoc">Set the PWM duty cycle and frequency.</div></div>
<div class="ttc" id="agroup__group__hal__pwm_html_ga95006bcc5841e610719433660365e3e2"><div class="ttname"><a href="group__group__hal__pwm.html#ga95006bcc5841e610719433660365e3e2">cyhal_pwm_start</a></div><div class="ttdeci">cy_rslt_t cyhal_pwm_start(cyhal_pwm_t *obj)</div><div class="ttdoc">Starts the PWM generation and outputs on pin and compl_pin.</div></div>
<div class="ttc" id="agroup__group__result_html_gaca79700fcc701534ce61778a9bcf57d1"><div class="ttname"><a href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a></div><div class="ttdeci">uint32_t cy_rslt_t</div><div class="ttdoc">Provides the result of an operation as a structured bitfield.</div><div class="ttdef"><b>Definition:</b> cy_result.h:438</div></div>
</div><!-- fragment --><h2><a class="anchor" id="subsection_pwm_snippet_2"></a>
Snippet 2: Starting and stopping the PWM output</h2>
<p ><a class="el" href="group__group__hal__pwm.html#ga95006bcc5841e610719433660365e3e2">cyhal_pwm_start</a> and <a class="el" href="group__group__hal__pwm.html#ga03f475a0f908814996ad697ed3036798">cyhal_pwm_stop</a> functions can be used after PWM initialization to start and stop the PWM output.</p>
<div class="fragment"><div class="line">    <a class="code hl_struct" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> pwm_obj;</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Initialize PWM on the supplied pin and assign a new clock</span></div>
<div class="line">    rslt = <a class="code hl_define" href="group__group__hal__pwm.html#ga54a93c541bdbb3fce066a2af00d8b67f">cyhal_pwm_init</a>(&amp;pwm_obj, <a class="code hl_enumvalue" href="group__group__hal__impl__pin__package__psoc6__01__104__m__csp__ble.html#gga707195ce0627016bf371643bdd9caa51a23d505c049c81443b12e53d5b00b1be9">P0_0</a>, NULL);</div>
<div class="line">    CY_ASSERT(<a class="code hl_define" href="group__group__result.html#gaf58fac450d9fff4472f03ad68f6e546e">CY_RSLT_SUCCESS</a> == rslt);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Set a duty cycle of 50% and frequency of 1Hz</span></div>
<div class="line">    rslt = <a class="code hl_function" href="group__group__hal__pwm.html#ga69dd46478849e170fd91c8171be8ae95">cyhal_pwm_set_duty_cycle</a>(&amp;pwm_obj, 50, 1);</div>
<div class="line"> </div>
<div class="line">    <span class="keywordflow">while</span> (loop)</div>
<div class="line">    {</div>
<div class="line">        <span class="comment">// Stop the PWM output</span></div>
<div class="line">        rslt = <a class="code hl_function" href="group__group__hal__pwm.html#ga03f475a0f908814996ad697ed3036798">cyhal_pwm_stop</a>(&amp;pwm_obj);</div>
<div class="line"> </div>
<div class="line">        <span class="comment">// Delay for observing the output</span></div>
<div class="line">        <a class="code hl_function" href="group__group__hal__system.html#ga5f450769c1207d98134a9ced39adfdda">cyhal_system_delay_ms</a>(5000);</div>
<div class="line"> </div>
<div class="line">        <span class="comment">// (Re-)start the PWM output</span></div>
<div class="line">        rslt = <a class="code hl_function" href="group__group__hal__pwm.html#ga95006bcc5841e610719433660365e3e2">cyhal_pwm_start</a>(&amp;pwm_obj);</div>
<div class="line"> </div>
<div class="line">        <span class="comment">// Delay for observing the output</span></div>
<div class="line">        <a class="code hl_function" href="group__group__hal__system.html#ga5f450769c1207d98134a9ced39adfdda">cyhal_system_delay_ms</a>(5000);</div>
<div class="line">    }</div>
<div class="ttc" id="agroup__group__hal__pwm_html_ga03f475a0f908814996ad697ed3036798"><div class="ttname"><a href="group__group__hal__pwm.html#ga03f475a0f908814996ad697ed3036798">cyhal_pwm_stop</a></div><div class="ttdeci">cy_rslt_t cyhal_pwm_stop(cyhal_pwm_t *obj)</div><div class="ttdoc">Stops the PWM generation and outputs on pin and compl_pin.</div></div>
<div class="ttc" id="agroup__group__hal__system_html_ga5f450769c1207d98134a9ced39adfdda"><div class="ttname"><a href="group__group__hal__system.html#ga5f450769c1207d98134a9ced39adfdda">cyhal_system_delay_ms</a></div><div class="ttdeci">cy_rslt_t cyhal_system_delay_ms(uint32_t milliseconds)</div><div class="ttdoc">Requests that the current operation delays for at least the specified length of time.</div></div>
<div class="ttc" id="agroup__group__result_html_gaf58fac450d9fff4472f03ad68f6e546e"><div class="ttname"><a href="group__group__result.html#gaf58fac450d9fff4472f03ad68f6e546e">CY_RSLT_SUCCESS</a></div><div class="ttdeci">#define CY_RSLT_SUCCESS</div><div class="ttdoc">cy_rslt_t return value indicating success</div><div class="ttdef"><b>Definition:</b> cy_result.h:465</div></div>
</div><!-- fragment --><h2><a class="anchor" id="subsection_pwm_snippet_3"></a>
Snippet 3: Advanced PWM output to pin</h2>
<p ><a class="el" href="group__group__hal__pwm.html#gacbeddfe75ccc849d27bec32ce010eceb">cyhal_pwm_init_adv</a> can be used to specify advanced PWM options like an additional inverted PWM output, pulse alignment (left, right, center) and run mode (one-shot or continuous). The following snippet initializes a left-aligned, continuous running PWM assigned to the supplied pin. The inverted output is assigned to a second pin (<b>compl_pin</b>).</p>
<div class="fragment"><div class="line">    <a class="code hl_typedef" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a>   rslt;</div>
<div class="line">    <a class="code hl_struct" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> pwm_obj;</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Initialize a left-aligned, continuous running PWM signal and assign normal and inverted</span></div>
<div class="line">    <span class="comment">// outputs to pins</span></div>
<div class="line">    rslt = <a class="code hl_function" href="group__group__hal__pwm.html#gacbeddfe75ccc849d27bec32ce010eceb">cyhal_pwm_init_adv</a>(&amp;pwm_obj, <a class="code hl_enumvalue" href="group__group__hal__impl__pin__package__psoc6__01__104__m__csp__ble.html#gga707195ce0627016bf371643bdd9caa51a23d505c049c81443b12e53d5b00b1be9">P0_0</a>, <a class="code hl_enumvalue" href="group__group__hal__impl__pin__package__psoc6__01__104__m__csp__ble.html#gga707195ce0627016bf371643bdd9caa51a8c239764fe5c947cad341b176d49eb73">P0_1</a>, <a class="code hl_enumvalue" href="group__group__hal__pwm.html#gga251111384b543a19975df63353203b51a05ecb08e039afef0513837ce140a3fc1">CYHAL_PWM_LEFT_ALIGN</a>, <span class="keyword">true</span>, 0, <span class="keyword">false</span>, NULL);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Set a duty cycle of 80% on the normal PWM output with a frequency of 1kHz</span></div>
<div class="line">    rslt = <a class="code hl_function" href="group__group__hal__pwm.html#ga69dd46478849e170fd91c8171be8ae95">cyhal_pwm_set_duty_cycle</a>(&amp;pwm_obj, 80, 1000);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Start the PWM output</span></div>
<div class="line">    rslt = <a class="code hl_function" href="group__group__hal__pwm.html#ga95006bcc5841e610719433660365e3e2">cyhal_pwm_start</a>(&amp;pwm_obj);</div>
<div class="ttc" id="agroup__group__hal__impl__pin__package__psoc6__01__104__m__csp__ble_html_gga707195ce0627016bf371643bdd9caa51a8c239764fe5c947cad341b176d49eb73"><div class="ttname"><a href="group__group__hal__impl__pin__package__psoc6__01__104__m__csp__ble.html#gga707195ce0627016bf371643bdd9caa51a8c239764fe5c947cad341b176d49eb73">P0_1</a></div><div class="ttdeci">@ P0_1</div><div class="ttdoc">Port 0 Pin 1.</div><div class="ttdef"><b>Definition:</b> cyhal_psoc6_01_104_m_csp_ble.h:56</div></div>
<div class="ttc" id="agroup__group__hal__pwm_html_gacbeddfe75ccc849d27bec32ce010eceb"><div class="ttname"><a href="group__group__hal__pwm.html#gacbeddfe75ccc849d27bec32ce010eceb">cyhal_pwm_init_adv</a></div><div class="ttdeci">cy_rslt_t cyhal_pwm_init_adv(cyhal_pwm_t *obj, cyhal_gpio_t pin, cyhal_gpio_t compl_pin, cyhal_pwm_alignment_t pwm_alignment, bool continuous, uint32_t dead_time_us, bool invert, const cyhal_clock_t *clk)</div><div class="ttdoc">Initialize the PWM out peripheral and configure the pin.</div></div>
<div class="ttc" id="agroup__group__hal__pwm_html_gga251111384b543a19975df63353203b51a05ecb08e039afef0513837ce140a3fc1"><div class="ttname"><a href="group__group__hal__pwm.html#gga251111384b543a19975df63353203b51a05ecb08e039afef0513837ce140a3fc1">CYHAL_PWM_LEFT_ALIGN</a></div><div class="ttdeci">@ CYHAL_PWM_LEFT_ALIGN</div><div class="ttdoc">PWM is left aligned (signal starts high and goes low after compare match)</div><div class="ttdef"><b>Definition:</b> cyhal_pwm.h:143</div></div>
</div><!-- fragment --><h2><a class="anchor" id="subsection_pwm_snippet_4"></a>
Snippet 4: Interrupts on PWM events</h2>
<p >PWM events like hitting the terminal count or a compare event can be used to trigger a callback function. <br  />
 <a class="el" href="group__group__hal__pwm.html#ga558c129c5f5f9989319c591423fdeceb">cyhal_pwm_enable_event()</a> can be used to enable one or more events to trigger the callback function.</p>
<div class="fragment"><div class="line"><span class="keywordtype">void</span> pwm_event_handler(<span class="keywordtype">void</span>* callback_arg, <a class="code hl_enumeration" href="group__group__hal__pwm.html#gabfbeebd93efd6491261d3eb6aefef554">cyhal_pwm_event_t</a> event);</div>
<div class="line"> </div>
<div class="line"><a class="code hl_typedef" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a> snippet_cyhal_pwm_events(<span class="keywordtype">void</span>)</div>
<div class="line">{</div>
<div class="line">    <a class="code hl_typedef" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a>   rslt;</div>
<div class="line">    <a class="code hl_struct" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> pwm_obj;</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Initialize PWM on the supplied pin and assign a new clock</span></div>
<div class="line">    rslt = <a class="code hl_define" href="group__group__hal__pwm.html#ga54a93c541bdbb3fce066a2af00d8b67f">cyhal_pwm_init</a>(&amp;pwm_obj, <a class="code hl_enumvalue" href="group__group__hal__impl__pin__package__psoc6__01__104__m__csp__ble.html#gga707195ce0627016bf371643bdd9caa51a23d505c049c81443b12e53d5b00b1be9">P0_0</a>, NULL);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Set a duty cycle of 50% and frequency of 1Hz</span></div>
<div class="line">    <span class="keywordflow">if</span> (<a class="code hl_define" href="group__group__result.html#gaf58fac450d9fff4472f03ad68f6e546e">CY_RSLT_SUCCESS</a> == rslt)</div>
<div class="line">    {</div>
<div class="line">        rslt = <a class="code hl_function" href="group__group__hal__pwm.html#ga69dd46478849e170fd91c8171be8ae95">cyhal_pwm_set_duty_cycle</a>(&amp;pwm_obj, 50, 1);</div>
<div class="line">    }</div>
<div class="line"> </div>
<div class="line">    <span class="keywordflow">if</span> (<a class="code hl_define" href="group__group__result.html#gaf58fac450d9fff4472f03ad68f6e546e">CY_RSLT_SUCCESS</a> == rslt)</div>
<div class="line">    {</div>
<div class="line">        <span class="comment">// Register a callback function (pwm_event_handler) to execute on event trigger</span></div>
<div class="line">        <a class="code hl_function" href="group__group__hal__pwm.html#ga2e4256f7650bd1f38b852eeada4a55df">cyhal_pwm_register_callback</a>(&amp;pwm_obj, pwm_event_handler, NULL);</div>
<div class="line"> </div>
<div class="line">        <span class="comment">// Enable all events to trigger the callback</span></div>
<div class="line">        <a class="code hl_function" href="group__group__hal__pwm.html#ga558c129c5f5f9989319c591423fdeceb">cyhal_pwm_enable_event</a>(&amp;pwm_obj, <a class="code hl_enumvalue" href="group__group__hal__pwm.html#ggabfbeebd93efd6491261d3eb6aefef554a8c8570c6b62d204339202b002a326ad6">CYHAL_PWM_IRQ_ALL</a>, 3, <span class="keyword">true</span>);</div>
<div class="line"> </div>
<div class="line">        <span class="comment">// Start the PWM output</span></div>
<div class="line">        rslt = <a class="code hl_function" href="group__group__hal__pwm.html#ga95006bcc5841e610719433660365e3e2">cyhal_pwm_start</a>(&amp;pwm_obj);</div>
<div class="line">    }</div>
<div class="line"> </div>
<div class="line">    <span class="keywordflow">return</span> rslt;</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> pwm_event_handler(<span class="keywordtype">void</span>* callback_arg, <a class="code hl_enumeration" href="group__group__hal__pwm.html#gabfbeebd93efd6491261d3eb6aefef554">cyhal_pwm_event_t</a> event)</div>
<div class="line">{</div>
<div class="line">    (void)callback_arg;</div>
<div class="line"> </div>
<div class="line">    <span class="keywordflow">if</span> ((event &amp; <a class="code hl_enumvalue" href="group__group__hal__pwm.html#ggabfbeebd93efd6491261d3eb6aefef554aff354daea767d054ef38516556bbf20b">CYHAL_PWM_IRQ_COMPARE</a>) == <a class="code hl_enumvalue" href="group__group__hal__pwm.html#ggabfbeebd93efd6491261d3eb6aefef554aff354daea767d054ef38516556bbf20b">CYHAL_PWM_IRQ_COMPARE</a>)</div>
<div class="line">    {</div>
<div class="line">        <span class="comment">// Compare event triggered</span></div>
<div class="line">        <span class="comment">// Insert application code to handle event</span></div>
<div class="line">    }</div>
<div class="line">    <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((event &amp; <a class="code hl_enumvalue" href="group__group__hal__pwm.html#ggabfbeebd93efd6491261d3eb6aefef554a6544b76f92d881a053531d723ed70104">CYHAL_PWM_IRQ_TERMINAL_COUNT</a>) == <a class="code hl_enumvalue" href="group__group__hal__pwm.html#ggabfbeebd93efd6491261d3eb6aefef554a6544b76f92d881a053531d723ed70104">CYHAL_PWM_IRQ_TERMINAL_COUNT</a>)</div>
<div class="line">    {</div>
<div class="line">        <span class="comment">// Terminal count event triggered</span></div>
<div class="line">        <span class="comment">// Insert application code to handle event</span></div>
<div class="line">    }</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="ttc" id="agroup__group__hal__pwm_html_ga2e4256f7650bd1f38b852eeada4a55df"><div class="ttname"><a href="group__group__hal__pwm.html#ga2e4256f7650bd1f38b852eeada4a55df">cyhal_pwm_register_callback</a></div><div class="ttdeci">void cyhal_pwm_register_callback(cyhal_pwm_t *obj, cyhal_pwm_event_callback_t callback, void *callback_arg)</div><div class="ttdoc">Register a PWM interrupt handler.</div></div>
<div class="ttc" id="agroup__group__hal__pwm_html_ga558c129c5f5f9989319c591423fdeceb"><div class="ttname"><a href="group__group__hal__pwm.html#ga558c129c5f5f9989319c591423fdeceb">cyhal_pwm_enable_event</a></div><div class="ttdeci">void cyhal_pwm_enable_event(cyhal_pwm_t *obj, cyhal_pwm_event_t event, uint8_t intr_priority, bool enable)</div><div class="ttdoc">Configure PWM event enablement.</div></div>
<div class="ttc" id="agroup__group__hal__pwm_html_gabfbeebd93efd6491261d3eb6aefef554"><div class="ttname"><a href="group__group__hal__pwm.html#gabfbeebd93efd6491261d3eb6aefef554">cyhal_pwm_event_t</a></div><div class="ttdeci">cyhal_pwm_event_t</div><div class="ttdoc">PWM interrupt triggers.</div><div class="ttdef"><b>Definition:</b> cyhal_pwm.h:130</div></div>
<div class="ttc" id="agroup__group__hal__pwm_html_ggabfbeebd93efd6491261d3eb6aefef554a6544b76f92d881a053531d723ed70104"><div class="ttname"><a href="group__group__hal__pwm.html#ggabfbeebd93efd6491261d3eb6aefef554a6544b76f92d881a053531d723ed70104">CYHAL_PWM_IRQ_TERMINAL_COUNT</a></div><div class="ttdeci">@ CYHAL_PWM_IRQ_TERMINAL_COUNT</div><div class="ttdoc">Interrupt on terminal count match event.</div><div class="ttdef"><b>Definition:</b> cyhal_pwm.h:132</div></div>
<div class="ttc" id="agroup__group__hal__pwm_html_ggabfbeebd93efd6491261d3eb6aefef554a8c8570c6b62d204339202b002a326ad6"><div class="ttname"><a href="group__group__hal__pwm.html#ggabfbeebd93efd6491261d3eb6aefef554a8c8570c6b62d204339202b002a326ad6">CYHAL_PWM_IRQ_ALL</a></div><div class="ttdeci">@ CYHAL_PWM_IRQ_ALL</div><div class="ttdoc">Interrupt on any events.</div><div class="ttdef"><b>Definition:</b> cyhal_pwm.h:134</div></div>
<div class="ttc" id="agroup__group__hal__pwm_html_ggabfbeebd93efd6491261d3eb6aefef554aff354daea767d054ef38516556bbf20b"><div class="ttname"><a href="group__group__hal__pwm.html#ggabfbeebd93efd6491261d3eb6aefef554aff354daea767d054ef38516556bbf20b">CYHAL_PWM_IRQ_COMPARE</a></div><div class="ttdeci">@ CYHAL_PWM_IRQ_COMPARE</div><div class="ttdoc">Interrupt on compare match event.</div><div class="ttdef"><b>Definition:</b> cyhal_pwm.h:133</div></div>
</div><!-- fragment --> <table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="groups" name="groups"></a>
API Reference</h2></td></tr>
<tr class="memitem:group__group__hal__results__pwm"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__results__pwm.html">PWM HAL Results</a></td></tr>
<tr class="memdesc:group__group__hal__results__pwm"><td class="mdescLeft">&#160;</td><td class="mdescRight">PWM specific return codes. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga54a93c541bdbb3fce066a2af00d8b67f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#ga54a93c541bdbb3fce066a2af00d8b67f">cyhal_pwm_init</a>(obj,  pin,  clk)&#160;&#160;&#160;(<a class="el" href="group__group__hal__pwm.html#gacbeddfe75ccc849d27bec32ce010eceb">cyhal_pwm_init_adv</a>((obj), (pin), <a class="el" href="group__group__hal__impl__pin__package__xmc7200__320__bga.html#ggad38839a2406ac562d708d7639fbff225a3dbd1016ea99d087d747530418b89a01">NC</a>, <a class="el" href="group__group__hal__pwm.html#gga251111384b543a19975df63353203b51a05ecb08e039afef0513837ce140a3fc1">CYHAL_PWM_LEFT_ALIGN</a>, true, 0u, false, (clk)))</td></tr>
<tr class="memdesc:ga54a93c541bdbb3fce066a2af00d8b67f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the PWM out peripheral and configure the pin This is similar to the <a class="el" href="group__group__hal__pwm.html#gacbeddfe75ccc849d27bec32ce010eceb">cyhal_pwm_init_adv()</a> but uses defaults for some of the more advanced setup options.  <a href="group__group__hal__pwm.html#ga54a93c541bdbb3fce066a2af00d8b67f">More...</a><br /></td></tr>
<tr class="separator:ga54a93c541bdbb3fce066a2af00d8b67f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gaaa08c1a2445ea5243c96ca657b37ec67"><td class="memItemLeft" align="right" valign="top"><a id="gaaa08c1a2445ea5243c96ca657b37ec67" name="gaaa08c1a2445ea5243c96ca657b37ec67"></a>
typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><b>cyhal_pwm_event_callback_t</b>) (void *callback_arg, <a class="el" href="group__group__hal__pwm.html#gabfbeebd93efd6491261d3eb6aefef554">cyhal_pwm_event_t</a> event)</td></tr>
<tr class="memdesc:gaaa08c1a2445ea5243c96ca657b37ec67"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handler for PWM interrupts. <br /></td></tr>
<tr class="separator:gaaa08c1a2445ea5243c96ca657b37ec67"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gabfbeebd93efd6491261d3eb6aefef554"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#gabfbeebd93efd6491261d3eb6aefef554">cyhal_pwm_event_t</a> { <br />
&#160;&#160;<a class="el" href="group__group__hal__pwm.html#ggabfbeebd93efd6491261d3eb6aefef554a2984287e6c0b15bc61328815d59f4b3a">CYHAL_PWM_IRQ_NONE</a> = 0
, <br />
&#160;&#160;<a class="el" href="group__group__hal__pwm.html#ggabfbeebd93efd6491261d3eb6aefef554a6544b76f92d881a053531d723ed70104">CYHAL_PWM_IRQ_TERMINAL_COUNT</a> = 1 &lt;&lt; 0
, <br />
&#160;&#160;<a class="el" href="group__group__hal__pwm.html#ggabfbeebd93efd6491261d3eb6aefef554aff354daea767d054ef38516556bbf20b">CYHAL_PWM_IRQ_COMPARE</a> = 1 &lt;&lt; 1
, <br />
&#160;&#160;<a class="el" href="group__group__hal__pwm.html#ggabfbeebd93efd6491261d3eb6aefef554a8c8570c6b62d204339202b002a326ad6">CYHAL_PWM_IRQ_ALL</a> = (1 &lt;&lt; 2) - 1
<br />
 }</td></tr>
<tr class="memdesc:gabfbeebd93efd6491261d3eb6aefef554"><td class="mdescLeft">&#160;</td><td class="mdescRight">PWM interrupt triggers.  <a href="group__group__hal__pwm.html#gabfbeebd93efd6491261d3eb6aefef554">More...</a><br /></td></tr>
<tr class="separator:gabfbeebd93efd6491261d3eb6aefef554"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga251111384b543a19975df63353203b51"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#ga251111384b543a19975df63353203b51">cyhal_pwm_alignment_t</a> { <br />
&#160;&#160;<a class="el" href="group__group__hal__pwm.html#gga251111384b543a19975df63353203b51a05ecb08e039afef0513837ce140a3fc1">CYHAL_PWM_LEFT_ALIGN</a> = 0
, <br />
&#160;&#160;<a class="el" href="group__group__hal__pwm.html#gga251111384b543a19975df63353203b51ae604cf9b7d021f86aff923fe916a8591">CYHAL_PWM_RIGHT_ALIGN</a> = 1
, <br />
&#160;&#160;<a class="el" href="group__group__hal__pwm.html#gga251111384b543a19975df63353203b51a2d5bca81d542fd2ca4a1348336c67af1">CYHAL_PWM_CENTER_ALIGN</a> = 2
<br />
 }</td></tr>
<tr class="memdesc:ga251111384b543a19975df63353203b51"><td class="mdescLeft">&#160;</td><td class="mdescRight">PWM alignment.  <a href="group__group__hal__pwm.html#ga251111384b543a19975df63353203b51">More...</a><br /></td></tr>
<tr class="separator:ga251111384b543a19975df63353203b51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacca527398174f6aeb9f11b1221c700dd"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#gacca527398174f6aeb9f11b1221c700dd">cyhal_pwm_input_t</a> { <br />
&#160;&#160;<a class="el" href="group__group__hal__pwm.html#ggacca527398174f6aeb9f11b1221c700dda9988e765bf4a3a5a9ac44236f68dd45a">CYHAL_PWM_INPUT_START</a>
, <br />
&#160;&#160;<a class="el" href="group__group__hal__pwm.html#ggacca527398174f6aeb9f11b1221c700dda44eaf03128e2ba419273f9d6ea9dbcec">CYHAL_PWM_INPUT_STOP</a>
, <br />
&#160;&#160;<a class="el" href="group__group__hal__pwm.html#ggacca527398174f6aeb9f11b1221c700dda9fc4ec918dd0ab5673f27d1108c823f3">CYHAL_PWM_INPUT_RELOAD</a>
, <br />
&#160;&#160;<a class="el" href="group__group__hal__pwm.html#ggacca527398174f6aeb9f11b1221c700dda9637abbb4c8e9f68db27d45c5269daa3">CYHAL_PWM_INPUT_COUNT</a>
, <br />
&#160;&#160;<a class="el" href="group__group__hal__pwm.html#ggacca527398174f6aeb9f11b1221c700ddab9b212b8519f7fcc33681cb81366dc33">CYHAL_PWM_INPUT_CAPTURE</a>
<br />
 }</td></tr>
<tr class="memdesc:gacca527398174f6aeb9f11b1221c700dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">PWM input signal.  <a href="group__group__hal__pwm.html#gacca527398174f6aeb9f11b1221c700dd">More...</a><br /></td></tr>
<tr class="separator:gacca527398174f6aeb9f11b1221c700dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadfe1c35104f1fe901d41bef508fa2f1b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#gadfe1c35104f1fe901d41bef508fa2f1b">cyhal_pwm_output_t</a> { <br />
&#160;&#160;<a class="el" href="group__group__hal__pwm.html#ggadfe1c35104f1fe901d41bef508fa2f1ba546535dbda49e6ba6340705779b85954">CYHAL_PWM_OUTPUT_OVERFLOW</a>
, <br />
&#160;&#160;<a class="el" href="group__group__hal__pwm.html#ggadfe1c35104f1fe901d41bef508fa2f1ba5f511cbc1f096209ad74b58af48d047f">CYHAL_PWM_OUTPUT_UNDERFLOW</a>
, <br />
&#160;&#160;<a class="el" href="group__group__hal__pwm.html#ggadfe1c35104f1fe901d41bef508fa2f1baa25a5c7360b8d12592130669d6643662">CYHAL_PWM_OUTPUT_COMPARE_MATCH</a>
, <br />
&#160;&#160;<a class="el" href="group__group__hal__pwm.html#ggadfe1c35104f1fe901d41bef508fa2f1bab2b29c612b286ab1ded5c119dae9e701">CYHAL_PWM_OUTPUT_LINE_OUT</a>
<br />
 }</td></tr>
<tr class="memdesc:gadfe1c35104f1fe901d41bef508fa2f1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">PWM output signal.  <a href="group__group__hal__pwm.html#gadfe1c35104f1fe901d41bef508fa2f1b">More...</a><br /></td></tr>
<tr class="separator:gadfe1c35104f1fe901d41bef508fa2f1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gacbeddfe75ccc849d27bec32ce010eceb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#gacbeddfe75ccc849d27bec32ce010eceb">cyhal_pwm_init_adv</a> (<a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *obj, <a class="el" href="group__group__hal__impl__pin__package__psoc6__01__104__m__csp__ble.html#ga707195ce0627016bf371643bdd9caa51">cyhal_gpio_t</a> pin, <a class="el" href="group__group__hal__impl__pin__package__psoc6__01__104__m__csp__ble.html#ga707195ce0627016bf371643bdd9caa51">cyhal_gpio_t</a> compl_pin, <a class="el" href="group__group__hal__pwm.html#ga251111384b543a19975df63353203b51">cyhal_pwm_alignment_t</a> pwm_alignment, bool continuous, uint32_t dead_time_us, bool invert, const <a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__clock__t">cyhal_clock_t</a> *clk)</td></tr>
<tr class="memdesc:gacbeddfe75ccc849d27bec32ce010eceb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the PWM out peripheral and configure the pin.  <a href="group__group__hal__pwm.html#gacbeddfe75ccc849d27bec32ce010eceb">More...</a><br /></td></tr>
<tr class="separator:gacbeddfe75ccc849d27bec32ce010eceb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga81aee9136b71f0d3228a30caea794712"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#ga81aee9136b71f0d3228a30caea794712">cyhal_pwm_init_cfg</a> (<a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *obj, const <a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__configurator__t">cyhal_pwm_configurator_t</a> *cfg)</td></tr>
<tr class="memdesc:ga81aee9136b71f0d3228a30caea794712"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the PWM out peripheral using a configurator generated configuration struct.  <a href="group__group__hal__pwm.html#ga81aee9136b71f0d3228a30caea794712">More...</a><br /></td></tr>
<tr class="separator:ga81aee9136b71f0d3228a30caea794712"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3e4e8aa7a73d02a15dcf386c335b1598"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#ga3e4e8aa7a73d02a15dcf386c335b1598">cyhal_pwm_free</a> (<a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *obj)</td></tr>
<tr class="memdesc:ga3e4e8aa7a73d02a15dcf386c335b1598"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deinitialize the PWM object.  <a href="group__group__hal__pwm.html#ga3e4e8aa7a73d02a15dcf386c335b1598">More...</a><br /></td></tr>
<tr class="separator:ga3e4e8aa7a73d02a15dcf386c335b1598"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaab0dc18eb0b1c51623df07f2c275a578"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#gaab0dc18eb0b1c51623df07f2c275a578">cyhal_pwm_set_period</a> (<a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *obj, uint32_t period_us, uint32_t pulse_width_us)</td></tr>
<tr class="memdesc:gaab0dc18eb0b1c51623df07f2c275a578"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the number of microseconds for the PWM period &amp; pulse width.  <a href="group__group__hal__pwm.html#gaab0dc18eb0b1c51623df07f2c275a578">More...</a><br /></td></tr>
<tr class="separator:gaab0dc18eb0b1c51623df07f2c275a578"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga69dd46478849e170fd91c8171be8ae95"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#ga69dd46478849e170fd91c8171be8ae95">cyhal_pwm_set_duty_cycle</a> (<a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *obj, cy_float32_t duty_cycle, uint32_t frequencyhal_hz)</td></tr>
<tr class="memdesc:ga69dd46478849e170fd91c8171be8ae95"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the PWM duty cycle and frequency.  <a href="group__group__hal__pwm.html#ga69dd46478849e170fd91c8171be8ae95">More...</a><br /></td></tr>
<tr class="separator:ga69dd46478849e170fd91c8171be8ae95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga95006bcc5841e610719433660365e3e2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#ga95006bcc5841e610719433660365e3e2">cyhal_pwm_start</a> (<a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *obj)</td></tr>
<tr class="memdesc:ga95006bcc5841e610719433660365e3e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts the PWM generation and outputs on <b>pin</b> and <b>compl_pin</b>.  <a href="group__group__hal__pwm.html#ga95006bcc5841e610719433660365e3e2">More...</a><br /></td></tr>
<tr class="separator:ga95006bcc5841e610719433660365e3e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga03f475a0f908814996ad697ed3036798"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#ga03f475a0f908814996ad697ed3036798">cyhal_pwm_stop</a> (<a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *obj)</td></tr>
<tr class="memdesc:ga03f475a0f908814996ad697ed3036798"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops the PWM generation and outputs on <b>pin</b> and <b>compl_pin</b>.  <a href="group__group__hal__pwm.html#ga03f475a0f908814996ad697ed3036798">More...</a><br /></td></tr>
<tr class="separator:ga03f475a0f908814996ad697ed3036798"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2e4256f7650bd1f38b852eeada4a55df"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#ga2e4256f7650bd1f38b852eeada4a55df">cyhal_pwm_register_callback</a> (<a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *obj, <a class="el" href="group__group__hal__pwm.html#gaaa08c1a2445ea5243c96ca657b37ec67">cyhal_pwm_event_callback_t</a> callback, void *callback_arg)</td></tr>
<tr class="memdesc:ga2e4256f7650bd1f38b852eeada4a55df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register a PWM interrupt handler.  <a href="group__group__hal__pwm.html#ga2e4256f7650bd1f38b852eeada4a55df">More...</a><br /></td></tr>
<tr class="separator:ga2e4256f7650bd1f38b852eeada4a55df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga558c129c5f5f9989319c591423fdeceb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#ga558c129c5f5f9989319c591423fdeceb">cyhal_pwm_enable_event</a> (<a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *obj, <a class="el" href="group__group__hal__pwm.html#gabfbeebd93efd6491261d3eb6aefef554">cyhal_pwm_event_t</a> event, uint8_t intr_priority, bool enable)</td></tr>
<tr class="memdesc:ga558c129c5f5f9989319c591423fdeceb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure PWM event enablement.  <a href="group__group__hal__pwm.html#ga558c129c5f5f9989319c591423fdeceb">More...</a><br /></td></tr>
<tr class="separator:ga558c129c5f5f9989319c591423fdeceb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafa371f9c9b4e47998d83284849c9f921"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#gafa371f9c9b4e47998d83284849c9f921">cyhal_pwm_connect_digital</a> (<a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *obj, <a class="el" href="group__group__hal__impl__triggers__psoc6__01.html#ga96236d1368f920d28af90262e8b57046">cyhal_source_t</a> source, <a class="el" href="group__group__hal__pwm.html#gacca527398174f6aeb9f11b1221c700dd">cyhal_pwm_input_t</a> signal)</td></tr>
<tr class="memdesc:gafa371f9c9b4e47998d83284849c9f921"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects a source signal and configures and enables a PWM event to be triggered from that signal.  <a href="group__group__hal__pwm.html#gafa371f9c9b4e47998d83284849c9f921">More...</a><br /></td></tr>
<tr class="separator:gafa371f9c9b4e47998d83284849c9f921"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga69d0e9394b204dfb92272313d545d7fa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#ga69d0e9394b204dfb92272313d545d7fa">cyhal_pwm_connect_digital2</a> (<a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *obj, <a class="el" href="group__group__hal__impl__triggers__psoc6__01.html#ga96236d1368f920d28af90262e8b57046">cyhal_source_t</a> source, <a class="el" href="group__group__hal__pwm.html#gacca527398174f6aeb9f11b1221c700dd">cyhal_pwm_input_t</a> signal, <a class="el" href="group__group__hal__general__types.html#ga48a2f3a7a4210f50859fc68fa3db9391">cyhal_edge_type_t</a> edge_type)</td></tr>
<tr class="memdesc:ga69d0e9394b204dfb92272313d545d7fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects a source signal and configures and enables a PWM event to be triggered from that signal with a configurable edge type.  <a href="group__group__hal__pwm.html#ga69d0e9394b204dfb92272313d545d7fa">More...</a><br /></td></tr>
<tr class="separator:ga69d0e9394b204dfb92272313d545d7fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9757bece5e0527f3a8b6df054c49331f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#ga9757bece5e0527f3a8b6df054c49331f">cyhal_pwm_enable_output</a> (<a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *obj, <a class="el" href="group__group__hal__pwm.html#gadfe1c35104f1fe901d41bef508fa2f1b">cyhal_pwm_output_t</a> signal, <a class="el" href="group__group__hal__impl__triggers__psoc6__01.html#ga96236d1368f920d28af90262e8b57046">cyhal_source_t</a> *source)</td></tr>
<tr class="memdesc:ga9757bece5e0527f3a8b6df054c49331f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables the specified output signal from a PWM that will be triggered when the corresponding event occurs.  <a href="group__group__hal__pwm.html#ga9757bece5e0527f3a8b6df054c49331f">More...</a><br /></td></tr>
<tr class="separator:ga9757bece5e0527f3a8b6df054c49331f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab9dace048801024e679d05062a736be4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#gab9dace048801024e679d05062a736be4">cyhal_pwm_disconnect_digital</a> (<a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *obj, <a class="el" href="group__group__hal__impl__triggers__psoc6__01.html#ga96236d1368f920d28af90262e8b57046">cyhal_source_t</a> source, <a class="el" href="group__group__hal__pwm.html#gacca527398174f6aeb9f11b1221c700dd">cyhal_pwm_input_t</a> signal)</td></tr>
<tr class="memdesc:gab9dace048801024e679d05062a736be4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnects a source signal and disables the PWM event.  <a href="group__group__hal__pwm.html#gab9dace048801024e679d05062a736be4">More...</a><br /></td></tr>
<tr class="separator:gab9dace048801024e679d05062a736be4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaae684b7ed7ea8beb04ab38b82eeddf3d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__hal__pwm.html#gaae684b7ed7ea8beb04ab38b82eeddf3d">cyhal_pwm_disable_output</a> (<a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *obj, <a class="el" href="group__group__hal__pwm.html#gadfe1c35104f1fe901d41bef508fa2f1b">cyhal_pwm_output_t</a> signal)</td></tr>
<tr class="memdesc:gaae684b7ed7ea8beb04ab38b82eeddf3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables the specified output signal from a PWM.  <a href="group__group__hal__pwm.html#gaae684b7ed7ea8beb04ab38b82eeddf3d">More...</a><br /></td></tr>
<tr class="separator:gaae684b7ed7ea8beb04ab38b82eeddf3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga54a93c541bdbb3fce066a2af00d8b67f" name="ga54a93c541bdbb3fce066a2af00d8b67f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga54a93c541bdbb3fce066a2af00d8b67f">&#9670;&nbsp;</a></span>cyhal_pwm_init</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cyhal_pwm_init</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">obj, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">pin, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">clk&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;(<a class="el" href="group__group__hal__pwm.html#gacbeddfe75ccc849d27bec32ce010eceb">cyhal_pwm_init_adv</a>((obj), (pin), <a class="el" href="group__group__hal__impl__pin__package__xmc7200__320__bga.html#ggad38839a2406ac562d708d7639fbff225a3dbd1016ea99d087d747530418b89a01">NC</a>, <a class="el" href="group__group__hal__pwm.html#gga251111384b543a19975df63353203b51a05ecb08e039afef0513837ce140a3fc1">CYHAL_PWM_LEFT_ALIGN</a>, true, 0u, false, (clk)))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize the PWM out peripheral and configure the pin This is similar to the <a class="el" href="group__group__hal__pwm.html#gacbeddfe75ccc849d27bec32ce010eceb">cyhal_pwm_init_adv()</a> but uses defaults for some of the more advanced setup options. </p>
<p >See <a class="el" href="group__group__hal__pwm.html#subsection_pwm_snippet_1">Snippet 1: Simple PWM initialization and output to pin</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">obj</td><td>Pointer to a PWM object. The caller must allocate the memory for this object but the init function will initialize its contents. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>The PWM pin to initialize. This pin is required, it cannot be <a class="el" href="group__group__hal__impl__pin__package__xmc7200__320__bga.html#ggad38839a2406ac562d708d7639fbff225a3dbd1016ea99d087d747530418b89a01">NC</a> (No Connect). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">clk</td><td>An optional, pre-allocated clock to use, if NULL a new clock will be allocated </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the init request. </dd></dl>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="gabfbeebd93efd6491261d3eb6aefef554" name="gabfbeebd93efd6491261d3eb6aefef554"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabfbeebd93efd6491261d3eb6aefef554">&#9670;&nbsp;</a></span>cyhal_pwm_event_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__group__hal__pwm.html#gabfbeebd93efd6491261d3eb6aefef554">cyhal_pwm_event_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>PWM interrupt triggers. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggabfbeebd93efd6491261d3eb6aefef554a2984287e6c0b15bc61328815d59f4b3a" name="ggabfbeebd93efd6491261d3eb6aefef554a2984287e6c0b15bc61328815d59f4b3a"></a>CYHAL_PWM_IRQ_NONE&#160;</td><td class="fielddoc"><p >No interrupts. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggabfbeebd93efd6491261d3eb6aefef554a6544b76f92d881a053531d723ed70104" name="ggabfbeebd93efd6491261d3eb6aefef554a6544b76f92d881a053531d723ed70104"></a>CYHAL_PWM_IRQ_TERMINAL_COUNT&#160;</td><td class="fielddoc"><p >Interrupt on terminal count match event. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggabfbeebd93efd6491261d3eb6aefef554aff354daea767d054ef38516556bbf20b" name="ggabfbeebd93efd6491261d3eb6aefef554aff354daea767d054ef38516556bbf20b"></a>CYHAL_PWM_IRQ_COMPARE&#160;</td><td class="fielddoc"><p >Interrupt on compare match event. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggabfbeebd93efd6491261d3eb6aefef554a8c8570c6b62d204339202b002a326ad6" name="ggabfbeebd93efd6491261d3eb6aefef554a8c8570c6b62d204339202b002a326ad6"></a>CYHAL_PWM_IRQ_ALL&#160;</td><td class="fielddoc"><p >Interrupt on any events. </p>
</td></tr>
</table>

</div>
</div>
<a id="ga251111384b543a19975df63353203b51" name="ga251111384b543a19975df63353203b51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga251111384b543a19975df63353203b51">&#9670;&nbsp;</a></span>cyhal_pwm_alignment_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__group__hal__pwm.html#ga251111384b543a19975df63353203b51">cyhal_pwm_alignment_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>PWM alignment. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga251111384b543a19975df63353203b51a05ecb08e039afef0513837ce140a3fc1" name="gga251111384b543a19975df63353203b51a05ecb08e039afef0513837ce140a3fc1"></a>CYHAL_PWM_LEFT_ALIGN&#160;</td><td class="fielddoc"><p >PWM is left aligned (signal starts high and goes low after compare match) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga251111384b543a19975df63353203b51ae604cf9b7d021f86aff923fe916a8591" name="gga251111384b543a19975df63353203b51ae604cf9b7d021f86aff923fe916a8591"></a>CYHAL_PWM_RIGHT_ALIGN&#160;</td><td class="fielddoc"><p >PWM is right aligned (signal starts low and goes high after compare match) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga251111384b543a19975df63353203b51a2d5bca81d542fd2ca4a1348336c67af1" name="gga251111384b543a19975df63353203b51a2d5bca81d542fd2ca4a1348336c67af1"></a>CYHAL_PWM_CENTER_ALIGN&#160;</td><td class="fielddoc"><p >PWM is centered aligned (signal starts and ends low with a center aligned pulse) </p>
</td></tr>
</table>

</div>
</div>
<a id="gacca527398174f6aeb9f11b1221c700dd" name="gacca527398174f6aeb9f11b1221c700dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacca527398174f6aeb9f11b1221c700dd">&#9670;&nbsp;</a></span>cyhal_pwm_input_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__group__hal__pwm.html#gacca527398174f6aeb9f11b1221c700dd">cyhal_pwm_input_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>PWM input signal. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggacca527398174f6aeb9f11b1221c700dda9988e765bf4a3a5a9ac44236f68dd45a" name="ggacca527398174f6aeb9f11b1221c700dda9988e765bf4a3a5a9ac44236f68dd45a"></a>CYHAL_PWM_INPUT_START&#160;</td><td class="fielddoc"><p >Start signal. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggacca527398174f6aeb9f11b1221c700dda44eaf03128e2ba419273f9d6ea9dbcec" name="ggacca527398174f6aeb9f11b1221c700dda44eaf03128e2ba419273f9d6ea9dbcec"></a>CYHAL_PWM_INPUT_STOP&#160;</td><td class="fielddoc"><p >Stop signal. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggacca527398174f6aeb9f11b1221c700dda9fc4ec918dd0ab5673f27d1108c823f3" name="ggacca527398174f6aeb9f11b1221c700dda9fc4ec918dd0ab5673f27d1108c823f3"></a>CYHAL_PWM_INPUT_RELOAD&#160;</td><td class="fielddoc"><p >Reload signal. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggacca527398174f6aeb9f11b1221c700dda9637abbb4c8e9f68db27d45c5269daa3" name="ggacca527398174f6aeb9f11b1221c700dda9637abbb4c8e9f68db27d45c5269daa3"></a>CYHAL_PWM_INPUT_COUNT&#160;</td><td class="fielddoc"><p >Count signal. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggacca527398174f6aeb9f11b1221c700ddab9b212b8519f7fcc33681cb81366dc33" name="ggacca527398174f6aeb9f11b1221c700ddab9b212b8519f7fcc33681cb81366dc33"></a>CYHAL_PWM_INPUT_CAPTURE&#160;</td><td class="fielddoc"><p >Capture/swap signal. </p>
</td></tr>
</table>

</div>
</div>
<a id="gadfe1c35104f1fe901d41bef508fa2f1b" name="gadfe1c35104f1fe901d41bef508fa2f1b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadfe1c35104f1fe901d41bef508fa2f1b">&#9670;&nbsp;</a></span>cyhal_pwm_output_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__group__hal__pwm.html#gadfe1c35104f1fe901d41bef508fa2f1b">cyhal_pwm_output_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>PWM output signal. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggadfe1c35104f1fe901d41bef508fa2f1ba546535dbda49e6ba6340705779b85954" name="ggadfe1c35104f1fe901d41bef508fa2f1ba546535dbda49e6ba6340705779b85954"></a>CYHAL_PWM_OUTPUT_OVERFLOW&#160;</td><td class="fielddoc"><p >Overflow signal. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggadfe1c35104f1fe901d41bef508fa2f1ba5f511cbc1f096209ad74b58af48d047f" name="ggadfe1c35104f1fe901d41bef508fa2f1ba5f511cbc1f096209ad74b58af48d047f"></a>CYHAL_PWM_OUTPUT_UNDERFLOW&#160;</td><td class="fielddoc"><p >Underflow signal. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggadfe1c35104f1fe901d41bef508fa2f1baa25a5c7360b8d12592130669d6643662" name="ggadfe1c35104f1fe901d41bef508fa2f1baa25a5c7360b8d12592130669d6643662"></a>CYHAL_PWM_OUTPUT_COMPARE_MATCH&#160;</td><td class="fielddoc"><p >Compare Match signal. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggadfe1c35104f1fe901d41bef508fa2f1bab2b29c612b286ab1ded5c119dae9e701" name="ggadfe1c35104f1fe901d41bef508fa2f1bab2b29c612b286ab1ded5c119dae9e701"></a>CYHAL_PWM_OUTPUT_LINE_OUT&#160;</td><td class="fielddoc"><p >PWM line out signal. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gacbeddfe75ccc849d27bec32ce010eceb" name="gacbeddfe75ccc849d27bec32ce010eceb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacbeddfe75ccc849d27bec32ce010eceb">&#9670;&nbsp;</a></span>cyhal_pwm_init_adv()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a> cyhal_pwm_init_adv </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__pin__package__psoc6__01__104__m__csp__ble.html#ga707195ce0627016bf371643bdd9caa51">cyhal_gpio_t</a>&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__pin__package__psoc6__01__104__m__csp__ble.html#ga707195ce0627016bf371643bdd9caa51">cyhal_gpio_t</a>&#160;</td>
          <td class="paramname"><em>compl_pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__hal__pwm.html#ga251111384b543a19975df63353203b51">cyhal_pwm_alignment_t</a>&#160;</td>
          <td class="paramname"><em>pwm_alignment</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>continuous</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>dead_time_us</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>invert</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__clock__t">cyhal_clock_t</a> *&#160;</td>
          <td class="paramname"><em>clk</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize the PWM out peripheral and configure the pin. </p>
<p >This is similar to the <a class="el" href="group__group__hal__pwm.html#ga54a93c541bdbb3fce066a2af00d8b67f">cyhal_pwm_init()</a> but provides additional setup options. <br  />
 See <a class="el" href="group__group__hal__pwm.html#subsection_pwm_snippet_3">Snippet 3: Advanced PWM output to pin</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">obj</td><td>Pointer to a PWM object. The caller must allocate the memory for this object but the init function will initialize its contents. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>The PWM pin to initialize. This pin is required, it cannot be <a class="el" href="group__group__hal__impl__pin__package__xmc7200__320__bga.html#ggad38839a2406ac562d708d7639fbff225a3dbd1016ea99d087d747530418b89a01">NC</a> (No Connect). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">compl_pin</td><td>An optional, additional inverted output pin. <br  />
 If supplied, this must be connected to the same or related PWM instance as <b>pin</b>, see <a class="el" href="group__group__hal__impl__pwm.html#section_hal_impl_pwm_compl_pins">Complementary PWM output</a> for details.<br  />
 If this output is not needed, use <a class="el" href="group__group__hal__impl__pin__package__xmc7200__320__bga.html#ggad38839a2406ac562d708d7639fbff225a3dbd1016ea99d087d747530418b89a01">NC</a> (No Connect). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pwm_alignment</td><td>PWM alignment: left, right, or center. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">continuous</td><td>PWM run type: continuous (true) or one shot (false). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dead_time_us</td><td>The number of micro-seconds for dead time. This is only meaningful if both <b>pin</b> and <b>compl_pin</b> are provided. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">invert</td><td>An option for the user to invert the PWM output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">clk</td><td>An optional, pre-allocated clock to use, if NULL a new clock will be allocated. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the init request</dd></dl>
<dl class="section note"><dt>Note</dt><dd>In some cases, it is possible to use a pin designated for non-inverting output as an inverting output and vice versa. Whether this is possible is dependent on the HAL implementation and operating mode. See the implementation specific documentation for details. </dd></dl>

</div>
</div>
<a id="ga81aee9136b71f0d3228a30caea794712" name="ga81aee9136b71f0d3228a30caea794712"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga81aee9136b71f0d3228a30caea794712">&#9670;&nbsp;</a></span>cyhal_pwm_init_cfg()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a> cyhal_pwm_init_cfg </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__configurator__t">cyhal_pwm_configurator_t</a> *&#160;</td>
          <td class="paramname"><em>cfg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize the PWM out peripheral using a configurator generated configuration struct. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">obj</td><td>Pointer to a PWM object. The caller must allocate the memory for this object but the init function will initialize its contents. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cfg</td><td>Configuration structure generated by a configurator. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the init request </dd></dl>

</div>
</div>
<a id="ga3e4e8aa7a73d02a15dcf386c335b1598" name="ga3e4e8aa7a73d02a15dcf386c335b1598"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3e4e8aa7a73d02a15dcf386c335b1598">&#9670;&nbsp;</a></span>cyhal_pwm_free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cyhal_pwm_free </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *&#160;</td>
          <td class="paramname"><em>obj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Deinitialize the PWM object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">obj</td><td>The PWM object </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaab0dc18eb0b1c51623df07f2c275a578" name="gaab0dc18eb0b1c51623df07f2c275a578"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaab0dc18eb0b1c51623df07f2c275a578">&#9670;&nbsp;</a></span>cyhal_pwm_set_period()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a> cyhal_pwm_set_period </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>period_us</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pulse_width_us</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the number of microseconds for the PWM period &amp; pulse width. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">obj</td><td>The PWM object </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">period_us</td><td>The period in microseconds </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pulse_width_us</td><td>The pulse width in microseconds </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the period request </dd></dl>

</div>
</div>
<a id="ga69dd46478849e170fd91c8171be8ae95" name="ga69dd46478849e170fd91c8171be8ae95"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga69dd46478849e170fd91c8171be8ae95">&#9670;&nbsp;</a></span>cyhal_pwm_set_duty_cycle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a> cyhal_pwm_set_duty_cycle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cy_float32_t&#160;</td>
          <td class="paramname"><em>duty_cycle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>frequencyhal_hz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the PWM duty cycle and frequency. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">obj</td><td>The PWM object </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">duty_cycle</td><td>The percentage of time the output is high (0 - 100%) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">frequencyhal_hz</td><td>The frequency of the PWM in Hz </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the duty cycle request </dd></dl>

</div>
</div>
<a id="ga95006bcc5841e610719433660365e3e2" name="ga95006bcc5841e610719433660365e3e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga95006bcc5841e610719433660365e3e2">&#9670;&nbsp;</a></span>cyhal_pwm_start()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a> cyhal_pwm_start </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *&#160;</td>
          <td class="paramname"><em>obj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts the PWM generation and outputs on <b>pin</b> and <b>compl_pin</b>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">obj</td><td>The PWM object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the start request </dd></dl>

</div>
</div>
<a id="ga03f475a0f908814996ad697ed3036798" name="ga03f475a0f908814996ad697ed3036798"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga03f475a0f908814996ad697ed3036798">&#9670;&nbsp;</a></span>cyhal_pwm_stop()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a> cyhal_pwm_stop </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *&#160;</td>
          <td class="paramname"><em>obj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Stops the PWM generation and outputs on <b>pin</b> and <b>compl_pin</b>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">obj</td><td>The PWM object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the stop request </dd></dl>

</div>
</div>
<a id="ga2e4256f7650bd1f38b852eeada4a55df" name="ga2e4256f7650bd1f38b852eeada4a55df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2e4256f7650bd1f38b852eeada4a55df">&#9670;&nbsp;</a></span>cyhal_pwm_register_callback()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cyhal_pwm_register_callback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__hal__pwm.html#gaaa08c1a2445ea5243c96ca657b37ec67">cyhal_pwm_event_callback_t</a>&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>callback_arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Register a PWM interrupt handler. </p>
<p >This function will be called when one of the events enabled by <a class="el" href="group__group__hal__pwm.html#ga558c129c5f5f9989319c591423fdeceb">cyhal_pwm_enable_event</a> occurs.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">obj</td><td>The PWM object </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>The callback handler which will be invoked when the event occurs </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">callback_arg</td><td>Generic argument that will be provided to the callback when called </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga558c129c5f5f9989319c591423fdeceb" name="ga558c129c5f5f9989319c591423fdeceb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga558c129c5f5f9989319c591423fdeceb">&#9670;&nbsp;</a></span>cyhal_pwm_enable_event()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cyhal_pwm_enable_event </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__hal__pwm.html#gabfbeebd93efd6491261d3eb6aefef554">cyhal_pwm_event_t</a>&#160;</td>
          <td class="paramname"><em>event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>intr_priority</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enable</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configure PWM event enablement. </p>
<p >When an enabled event occurs, the function specified by <a class="el" href="group__group__hal__pwm.html#ga2e4256f7650bd1f38b852eeada4a55df">cyhal_pwm_register_callback</a> will be called.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">obj</td><td>The PWM object </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">event</td><td>The PWM event type </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">intr_priority</td><td>The priority for NVIC interrupt events </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">enable</td><td>True to turn on events, False to turn off </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gafa371f9c9b4e47998d83284849c9f921" name="gafa371f9c9b4e47998d83284849c9f921"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafa371f9c9b4e47998d83284849c9f921">&#9670;&nbsp;</a></span>cyhal_pwm_connect_digital()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a> cyhal_pwm_connect_digital </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__triggers__psoc6__01.html#ga96236d1368f920d28af90262e8b57046">cyhal_source_t</a>&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__hal__pwm.html#gacca527398174f6aeb9f11b1221c700dd">cyhal_pwm_input_t</a>&#160;</td>
          <td class="paramname"><em>signal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Connects a source signal and configures and enables a PWM event to be triggered from that signal. </p>
<p >These PWM events can be configured independently and connect to the same or different source signals. </p><dl class="section note"><dt>Note</dt><dd>For "edge" signals, this function will default to rising edge. To control the edge type, use <a class="el" href="group__group__hal__pwm.html#ga69d0e9394b204dfb92272313d545d7fa">cyhal_pwm_connect_digital2</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">obj</td><td>PWM obj </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">source</td><td>Source signal obtained from another driver's cyhal_&lt;PERIPH&gt;_enable_output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">signal</td><td>The PWM input signal </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the connection </dd></dl>

</div>
</div>
<a id="ga69d0e9394b204dfb92272313d545d7fa" name="ga69d0e9394b204dfb92272313d545d7fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga69d0e9394b204dfb92272313d545d7fa">&#9670;&nbsp;</a></span>cyhal_pwm_connect_digital2()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a> cyhal_pwm_connect_digital2 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__triggers__psoc6__01.html#ga96236d1368f920d28af90262e8b57046">cyhal_source_t</a>&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__hal__pwm.html#gacca527398174f6aeb9f11b1221c700dd">cyhal_pwm_input_t</a>&#160;</td>
          <td class="paramname"><em>signal</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__hal__general__types.html#ga48a2f3a7a4210f50859fc68fa3db9391">cyhal_edge_type_t</a>&#160;</td>
          <td class="paramname"><em>edge_type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Connects a source signal and configures and enables a PWM event to be triggered from that signal with a configurable edge type. </p>
<p >These PWM events can be configured independently and connect to the same or different source signals.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">obj</td><td>PWM obj </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">source</td><td>Source signal obtained from another driver's cyhal_&lt;PERIPH&gt;_enable_output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">signal</td><td>The PWM input signal </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">edge_type</td><td>The edge type that should trigger the event. This must be consistent with the edge type of <code>source</code>. If <code>source</code> produces a "level" signal, the only valid value is <a class="el" href="group__group__hal__general__types.html#gga48a2f3a7a4210f50859fc68fa3db9391aa3d90da24e0ba6dff6a0f4c816d1853b">CYHAL_EDGE_TYPE_LEVEL</a>. If <code>source</code> produces an "edge" signal, then <a class="el" href="group__group__hal__general__types.html#gga48a2f3a7a4210f50859fc68fa3db9391aa3d90da24e0ba6dff6a0f4c816d1853b">CYHAL_EDGE_TYPE_LEVEL</a> is not a valid value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the connection </dd></dl>

</div>
</div>
<a id="ga9757bece5e0527f3a8b6df054c49331f" name="ga9757bece5e0527f3a8b6df054c49331f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9757bece5e0527f3a8b6df054c49331f">&#9670;&nbsp;</a></span>cyhal_pwm_enable_output()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a> cyhal_pwm_enable_output </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__hal__pwm.html#gadfe1c35104f1fe901d41bef508fa2f1b">cyhal_pwm_output_t</a>&#160;</td>
          <td class="paramname"><em>signal</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__triggers__psoc6__01.html#ga96236d1368f920d28af90262e8b57046">cyhal_source_t</a> *&#160;</td>
          <td class="paramname"><em>source</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enables the specified output signal from a PWM that will be triggered when the corresponding event occurs. </p>
<p >Multiple output signals can be configured simultaneously.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">obj</td><td>PWM obj </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">signal</td><td>The PWM output signal </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">source</td><td>Pointer to user-allocated source signal object which will be initialized by enable_output. <code>source</code> should be passed to (dis)connect_digital functions to (dis)connect the associated endpoints. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the output enable </dd></dl>

</div>
</div>
<a id="gab9dace048801024e679d05062a736be4" name="gab9dace048801024e679d05062a736be4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab9dace048801024e679d05062a736be4">&#9670;&nbsp;</a></span>cyhal_pwm_disconnect_digital()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a> cyhal_pwm_disconnect_digital </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__triggers__psoc6__01.html#ga96236d1368f920d28af90262e8b57046">cyhal_source_t</a>&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__hal__pwm.html#gacca527398174f6aeb9f11b1221c700dd">cyhal_pwm_input_t</a>&#160;</td>
          <td class="paramname"><em>signal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disconnects a source signal and disables the PWM event. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">obj</td><td>PWM obj </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">source</td><td>Source signal from cyhal_&lt;PERIPH&gt;_enable_output to disable </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">signal</td><td>The PWM input signal </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the disconnection </dd></dl>

</div>
</div>
<a id="gaae684b7ed7ea8beb04ab38b82eeddf3d" name="gaae684b7ed7ea8beb04ab38b82eeddf3d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaae684b7ed7ea8beb04ab38b82eeddf3d">&#9670;&nbsp;</a></span>cyhal_pwm_disable_output()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a> cyhal_pwm_disable_output </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__hal__impl__hw__types.html#structcyhal__pwm__t">cyhal_pwm_t</a> *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__hal__pwm.html#gadfe1c35104f1fe901d41bef508fa2f1b">cyhal_pwm_output_t</a>&#160;</td>
          <td class="paramname"><em>signal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disables the specified output signal from a PWM. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">obj</td><td>PWM obj </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">signal</td><td>The PWM output signal </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the output disable </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>Hardware Abstraction Layer (HAL)</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
